docs: document allowUserAgentAppInfo for Go, C#, Java, Ruby, and PHP SDKs - #6547
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
docs: document allowUserAgentAppInfo for Go, C#, Java, Ruby, and PHP SDKs#6547devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
…SDKs Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
|
🌿 Preview your docs: https://fern-preview-devin-1785949662-appinfo-five-langs.docs.buildwithfern.com/learn Here are the markdown pages you've updated: |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
The
appInfofeature lets whoever builds on top of a Fern-generated SDK attach their own application's product token to theUser-Agentheader, on top of what the SDK already reports about itself. A partner or platform that wraps the SDK can therefore identify its integration in outbound requests, so API providers can attribute traffic per integration without losing the SDK name, version, and platform telemetry the header already carries. It is opt-in per generator and off by default, so existing SDK output is unchanged.Implements docs for: feat(go): add opt-in appInfo client option appended to User-Agent (fern-api/fern#17305)
Implements docs for: feat(csharp): add opt-in appInfo client option appended to User-Agent (fern-api/fern#17303)
Implements docs for: feat(java): add opt-in appInfo client option appended to User-Agent (fern-api/fern#17301)
Implements docs for: feat(ruby): add opt-in appInfo client option appended to User-Agent (fern-api/fern#17300)
Implements docs for: feat(php): add opt-in appInfo client option appended to User-Agent (fern-api/fern#17299)
Summary
Adds one
<ParamField>per language, directly after the existing platform-headers option, to the generator configuration reference pages:generators/go/configuration.mdxallowUserAgentAppInfooption.WithUserAgentAppInfo(name, version, comment)generators/csharp/configuration.mdxallow-user-agent-app-infoAppInforecord onClientOptionsgenerators/java/configuration.mdxallowUserAgentAppInfo.appInfo(String name, String version, String comment)generators/ruby/configuration.mdxallowUserAgentAppInfoapp_info: { name:, version:, comment: }generators/php/configuration.mdxallowUserAgentAppInfoappInfo(array{name, version?, comment?})Each entry follows the wording used for TypeScript and Python in #6498, which is still open and covers those two languages: the token format (
{name}/{version} ({comment}), segments dropped when blank), a short client instantiation example, the resultingUser-Agentincluding the structured platform value, and the interaction with an explicitUser-Agentheader andomit-fern-headers. Config keys use each page's own casing convention, and the Java entry also notes composition withruntime-version.Anchor links use the lowercased ids the site actually renders (
#includeplatformheaders,#omitfernheaders) — the camel-cased anchors used in #6498 do not resolve.No SDK changelog entries, per the repo convention.
Validation
pre-commit run --files <changed files>: passed (Vale reports only pre-existing suggestions on untouched lines).cd fern && npx fern-api@5.59.0 check --warnings: 0 errors; warnings are pre-existing (API path conflicts, FDR 403, contrast ratio).Link to Devin session: https://app.devin.ai/sessions/7fef9a95e9494f4e8853f59d4cce70d1